﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using EditAnyString.Models;
using Newtonsoft.Json;

namespace EditAnyString.Web.Extensions
{
	public static class EASHtmlExtensions
	{
		public static IHtmlString GetRequestEditableStringsJson( this HtmlHelper html, IEnumerable<EditableString> strings )
		{
			string json = JsonConvert.SerializeObject( strings, Formatting.Indented );
			return MvcHtmlString.Create( json );
		}
	}
}